# 自动化步骤
# 安装 selenium库
import time
from selenium import webdriver
from selenium.webdriver.common.by import By

# 创建驱动对象
driver = webdriver.Edge()
# # 打开https://movie.douban.com/
driver.get("https://movie.douban.com/")
time.sleep(3)
# 在搜索框内输入你想看的电影
driver.find_element(By.XPATH,'/html/body/div[2]/div[1]/div/div[2]/form/fieldset/div[1]/input').send_keys('封神榜')
time.sleep(3)
# 点击搜搜
driver.find_element(By.XPATH,'/html/body/div[2]/div[1]/div/div[2]/form/fieldset/div[2]/input').click()
time.sleep(3)
# 点击搜索结果的第一条信息
driver.find_element(By.XPATH,'/html/body/div[3]/div[1]/div/div[2]/div[1]/div[1]/div[1]/div/div/div[1]/a').click()
time.sleep(300)
# 关闭浏览器
time.sleep(200)
driver.quit()
# 每操作一步time.sleep(3)






